package com.wuzuqing.android.eightdiagrams.hook.testHookers;

import android.net.wifi.WifiInfo;
import android.util.Log;

import com.swift.sandhook.annotation.HookClass;
import com.swift.sandhook.annotation.HookMethod;
import com.swift.sandhook.annotation.HookMethodBackup;
import com.swift.sandhook.annotation.ThisObject;
import com.swift.sandhook.wrapper.HookWrapper;

@HookClass(WifiInfo.class)
public class IPHooker {


    @HookMethodBackup("getIpAddress")
    static HookWrapper.HookEntity onPauseBackup;


    @HookMethod("getIpAddress")
    public static void getIpAddress(@ThisObject WifiInfo thiz) throws Throwable {
        Log.e("IPHooker", "hooked getIpAddress success " + thiz+","+thiz.getIpAddress());
        onPauseBackup.callOrigin(thiz);
    }

}
